package com.engineering.elink.co;

import io.swagger.annotations.ApiParam;

/**
 * 基础查询条件
 * 
 * @author hxjxiaojun
 * @time 2016年8月30日
 */
public class PageCo {
	@ApiParam(value = "当前页", required = false, defaultValue = "1")
	private int pageNo = 1;

	@ApiParam(value = "每页显示的记录数", required = false, defaultValue = "10")
	private int pageSize = 10;
	
	public PageCo (int pageNo, int pageSize) {
	this.pageNo = pageNo;
	this.pageSize = pageSize == 0 ? 10 : pageSize;
}
	
	@SuppressWarnings("unused")
	private int start;

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getStart() {
		return (pageNo - 1) * pageSize;
	}
}
